<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$config.site_title}网站后台登录入口</title>
<link href="__PUBLIC__/css/login.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script type="text/javascript">
	var URL = "{:U('/Login/verify')}?";
	function change_code(obj){
		$("#code").attr("src",URL+Math.random());
		$('#yzm').focus();
		return false;
	}
</script>
</head>
<body>

<div class="log_bg">
	<div class="log_m">
    	<div class="log_top">网站后台登录入口</div>
        <div class="log_cen">
        	<form method="post" action="{:U('/Login/login')}" onsubmit="return check();">
            	<div class="username">用户名:&nbsp;&nbsp;&nbsp;<input type="text" name="username" id="username" class="sdw" maxlength="32" /></div>
                <div class="password">密&nbsp;&nbsp;&nbsp;码:&nbsp;&nbsp;&nbsp;<input type="password" id="password" name="password" class="sdw" maxlength="32" /></div>
                <div class="yzm">
                	验证码:&nbsp;&nbsp;&nbsp;<input type="text" id="yzm" name="code" class="sdw" maxlength="4" />
                	<span><a href="javascript:void(change_code(this));"><img id="code" src="{:U('Login/verify')}" /></a></span>
                </div>
                <div class="log_exit">&nbsp;<input type="submit" value="" class="sub" />&nbsp;&nbsp;&nbsp;<input type="button" class="exit" value="" /></div>
            </form>
        </div>
    </div>
</div>

<script type="text/javascript">
	$(document).ready(function() {$('#username').focus();});
	function check() {
		if ($('#username').val() == "") { alert('用户名不能为空!'); $('#username').focus(); return false; }
		if ($('#password').val() == "") { alert('密码不能为空!'); $('#password').focus(); return false; }
		if ($('#yzm').val() == "") {alert('验证码不能为空');$('#yzm').focus(); return false;}
	}
</script>

</body>
</html>
